﻿@using Moonglade.Core
@model Moonglade.Model.CustomPage

@{
    ViewBag.TitlePrefix = Model.Title;
    ViewBag.HideSideBar = Model.HideSidebar;
}

@section head{
    <style>
        @Html.Raw(CustomPageService.RemoveWhiteSpaceFromStylesheets(Model.CssContent))
    </style>
}

@section metadescription{
    <meta name="description" content="@Model.MetaDescription" />
}

@if (null != ViewBag.IsDraftPreview)
{
    <div class="alert alert-info">
        @Localizer["This is a preview for draft content."]
    </div>
}

@if (BlogConfig.SecuritySettings.AllowScriptsInCustomPage)
{
    @Html.Raw(Model.RawHtmlContent)
}
else
{
    @Html.Raw(CustomPageService.RemoveScriptTagFromHtml(Model.RawHtmlContent))
}